package com.redrose.demo.fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.databinding.DataBindingComponent;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

import com.redrose.demo.bean.ListItem;
import com.redrose.demo.multiple.BaseMultipleViewHolder;

public abstract class BaseHomeViewHolder<T extends ViewDataBinding> extends BaseMultipleViewHolder<ListItem> {
    T bind;

    public BaseHomeViewHolder(ViewGroup parent, View view) {
        super(view);
        bind = getBind();
    }

    @Override
    protected abstract void bindView(ListItem bean);

    private T getBind() {
        return DataBindingUtil.bind(itemView);
    }
}
